import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

import org.apache.commons.io.IOUtils;


public class IOUtilTest {

	public static void main(String[] args) throws IOException {
		
		InputStream input = new URL("http://www.baidu.com").openStream();
		try {
			String result = IOUtils.toString(input);
			System.out.println(result);
		} finally {
			
			IOUtils.closeQuietly(input);
		}
		
	}
}
